<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="__CSS__/bootstrap.min.css" rel="stylesheet">
    <link href="__CSS__/repair.css" rel="stylesheet">
    <title>维修反馈</title>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-12">
            <form class="form-horizontal" action="{:U('Device/repair_add')}" enctype="multipart/form-data" method="POST">
                <fieldset>
                    <legend>维修反馈</legend>
                    <div class="form-group">
                        <label class="control-label col-md-2">设备名称</label>
                        <span id="equip-name" class="text-left col-md-10">
                            <?php 
                                $devicename = $arr['hdevice_name']; 
                                
                                $len =  strlen($devicename);
                                if($len>30){
                                  echo mb_substr($devicename,0,30)."..."; 
                                }else{
                                  echo $devicename; 
                                }   
                            ?>
                        </span>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">上次维修</label>
                        <span id="lastTime" class="text-left col-md-10"><?php echo $arr['hreport_time'];?></span>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">设备型号</label>
                        <span id="equip-id" class="text-left col-md-10"><?php echo $arr['dmodel'];?></span>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-2">更换部件</label>
                        <input type="radio" class="radioComponents" value="yes" name="components">是
                        <input checked="checked" type="radio" class="radioComponents" value="no" name="components">否
                        <div class="col-md-10">
                            <input type="text" id="componentsName" name="componentsName" class="form-control hidden" placeholder="请输入部件名称">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="describe" class="control-label col-md-2">故障排除描述</label>
                        <div class="col-md-10">
                            <textarea id="describe" name="msg[hrepair_message]" class="form-control" rows="3" placeholder="请输入故障排除详情"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="getImg" class="control-label col-md-2">附件图片</label>
                        <div class="col-md-10">
                            <input type="file" id="getImg" name="img" accept="image/*">
                            <button id="imgBtn" type="button" class="col-md-4">选择图片</button>
                            <div class="col-md-10">
                                <img id="img" class="center-block">
                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="reportid" value="<?php echo $reportid; ?>" />
                    <button id="submit" class="btn btn-primary center-block form-control">提交</button>
                </fieldset>
            </form>
            <br/>
    
            <form class="form-horizontal" action="{:U('Device/engineer_login',array('reportid'=>$reportid ) )}" method="POST">
                <button id="log" type="submit" class="btn btn-default center-block form-control btn-log">账号切换</button>
            </form>
        </div>
    </div>
</div>
</body>
<script src="__JS__/jquery.min.js"></script>
<script src="__JS__/bootstrap.min.js"></script>
<script src="__JS__/repair.js"></script>
</html>